package com.xls.resource.dialog;

import android.content.Context;
import android.view.View;
import android.widget.TextView;

import com.lzz.bottomencapsulation.popupwindow.CenterBaseDialog;
import com.xls.resource.R;

/***
 @package ${package}
 @filename ${filename}
 */
public class HintPW extends CenterBaseDialog implements View.OnClickListener {
    TextView hTvTitle;
    TextView hEtCarnum;
    TextView hTvConfirm;

    String title="提示",hint,confirmText="确定";

    public HintPW(Context context) {
        super(context);
    }

    public HintPW setTitle(String title) {
        this.title=title;
        return this;
    }

    public HintPW setHint(String hint) {
        this.hint=hint;
        return this;
    }

    public HintPW setBtnText(String text) {
        confirmText=text;
        return this;
    }

    @Override
    protected int getView() {
        return R.layout.popu_hint;
    }

    @Override
    protected void initView() {
        hTvTitle=findViewById(R.id.h_tv_title);
        hEtCarnum=findViewById(R.id.h_et_carnum);
        hTvConfirm=findViewById(R.id.h_tv_confirm);
        hTvTitle.setText(title);
        hEtCarnum.setText(hint);
        hTvConfirm.setText(confirmText);
        hTvConfirm.setOnClickListener(this);
    }

    @Override
    public void onClick(View view) {
        if (view.getId()==R.id.h_tv_confirm){
            dismiss();
        }
        if (onClickListener!=null) onClickListener.onClick(view);
    }
}

